<%@ page language="java"  pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="<s:url value="/style.css"/>" rel="stylesheet" type="text/css"/>
<title>Visitation History List</title>
<style>
	#infoLeft {
		display:inline-block;
		width:100px;
		alignX:center;
		margin-right:30px;
	}
	#infoRight {
		display:inline-block;
		alignX:center;
	}
	#paitentInfo {
		align:left;
	}
	h3 {
		alignX:left;
	}
	#visitationTable td {
		text-align:center;
	}
	#visitationHistoryTable td {
		text-align:center;
	}
	
</style>
</head>
<body>
	<jsp:include page="/navigation/navigation.jsp"/>
	<div id="mainBox">
	<center><h2>Visitation History List</h2></center>
			<center>
			<div>
				<h3>Visitations:</h3>
					<table id="visitationTable">
					<s:if test='actionMode=="showAll"'>
						<col width="120" />
					</s:if>
					<col width="50" />
					<col width="120" />
					<col width="120" />
					<col width="120" />
					<col width="100" />
					<col width="150" />
						<thead>
							<tr>
								<th>Patient</th>
								<th>Date</th>
								<th>StartTime</th>		
								<th>EndTime</th>
								<th>Doctor</th>
								<th>Location</th>
							</tr>
						</thead>
						<tbody>
							
							<tr>
								<td><s:property value="retrievedVisitationContent.visitation.appointment.patient.name" /></td>
								<td><s:property value="retrievedVisitationContent.visitation.appointment.appointmentDate" /></td>
								<td><s:property value="retrievedVisitationContent.visitation.appointment.startTime" /></td>
								<td><s:property value="retrievedVisitationContent.visitation.appointment.endTime" /></td>
								<td><s:property value="retrievedVisitationContent.visitation.appointment.doctor.name" /></td>
								<td><s:property value="retrievedVisitationContent.visitation.appointment.location" /></td>								
							</tr>

						</tbody>
					</table>
					</div>
					<div>
					<h3>Visitation History:</h3>
					<table id="visitationHistoryTable">
					<s:if test='actionMode=="showAll"'>
						<col width="120" />
					</s:if>
					<col width="200" />
					<col width="200" />
					<col width="200" />
						<thead>
							<tr>
								<th>Version Number</th>
								<th>Modification Time</th>		
								<th>Detail</th>		
							</tr>
						</thead>
						<tbody>
							<s:iterator value="retrievedVisitationContents">
							<tr>
							    <td><s:property value="version" /></td>
								<td><s:property value="lastModified" /></td>
								<td><a href="<s:url action='initVisitationViewPage'><s:param name="selectedVisitationContentId" value="%{visitationContentId}" /></s:url>">Details</a></td>
							</tr>
							</s:iterator>
						</tbody>
					</table>
					
					</div>
					
			</center>
			</div>
</body>
</html>